Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ListView and CollectionView comparison #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Implement ListView and CollectionView comparison #28

wants to merge 1 commit into from

Conversation

chowarth
Copy link

@chowarth chowarth commented Apr 25, 2019

I decided to replicate a PoC Playstation Network trophy app that I wrote a while back as it is a good example of ListView usage.

Screenshots

List View CollectionView
ListView collection_view

What went well?

Overall it was very straightforward to replicate the same page using a CollectionView instead of a ListView. As you can see from the screenshots, the way that the layouts are rendered appears identical.

What didn't go well?

The only problem that I ran into was that I initially tried to reuse the ViewCell that I created for the ListView with the CollectionView, reading through the documentation didn't seem to mention that you can't use a ViewCell as the root element for the CollectionView DataTemplate - I imagine you could get around this by using a ContentView as the root element in the layout though (I have not tried this though), this would then allow layouts to be written as reusable cells.

How is the performance?

Running on an x86_64 Android 9.0 emulator everything was a little sluggish and juddery when scrolling, but that could just be the emulator. When running on a device both the ListView and CollectionView were both very smooth when scrolling with a small occasional judder.

One thing that I did see with the ListView, but not with CollectionView, was that when scrolling down then scrolling back up again some controls within the ViewCell would disappear or be resized so their content was not displayed properly - this only seemed to affect labels and is not something I have seen when using Xamarin.Forms 3.x.

Missing or Desired Things:

I know some of these are either currently being worked on or are planned:

  • Pull-to-Refresh
  • Header / HeaderTemplate
  • Footer / FooterTemplate
  • Grouping doesn't seem to be possible
  • Item appearing/disappearing events
  • Scroll bar visibility
  • Separators
    • Visibility
    • Colour
    • Full width capability for iOS
  • Caching Strategy - It's not clear what the behaviour for each platform is.
  • Ability to use a ViewCell as the item template.

Swag Time!

Take a minute now or later and provide your info here: https://www.surveymonkey.com/r/WKBZCXX

@pauldipietro
Copy link
Owner

@chowarth Thanks for your contribution and feedback. I don't belive we have any interest in making the use of ViewCells a part of CollectionView in any way, as a main goal of CollectionView is to get rid of Cell use entirely. I will take note of the feedback though for our internal discussions regarding reusability and caching. Many other features like pull-to-refresh and the header/footer are planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants